package math;

public class MathUtil {
	public static float clamp(float value, float low, float high) {
		return Math.min(Math.max(value, low), high);
	}

	public static int floor(double par0) {
		int i = (int) par0;
		return par0 < (double) i ? i - 1 : i;
	}
	
	
	public static int get2Fold(int fold) {
		int ret = 2;
		while (ret < fold) {
			ret *= 2;
		}
		return ret;
	}

}
